package com.twu.biblioteca.menuoption;

import java.io.BufferedReader;
import java.io.IOException;

/**
 * Created by mduemcke on 9/25/14.
 */
public abstract class CheckoutOptionAbstract extends MenuOptionAbstract {

    private BufferedReader reader;

    public CheckoutOptionAbstract(BufferedReader reader, String label, char selector) {
        super(label, selector);
        this.reader = reader;
    }

    protected String askForDetails(String message) {
        try {
             System.out.println(message);
             String input = reader.readLine();
             return input;
        } catch(IOException ioe) {
            System.err.print(ioe.getStackTrace());
        }
        return "";
    }
}
